package com.qf.web.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.web.entity.Banner;

import java.util.List;


/**
 * @author KING
 * @ClassName: com.qf.web.mapper.BannerMapper
 * @Description: 该类的功能描述
 * @date: 2021/11/10 20:55
 */


public interface BannerMapper extends BaseMapper<Banner> {
    default List<Banner> getBanners() {
        QueryWrapper<Banner> qw = new QueryWrapper<>();
        qw.lambda().select(Banner::getName, Banner::getImageUrl, Banner::getLinkUrl)
                .eq(Banner::getStatus, 1)
                .eq(Banner::getType, 1);
        return selectList(qw);
    }
}
